<template>
  <view class="collapse-content" v-if="data">
    <view v-for="(item, index) in list" :key="index">
      <view>{{ item.label }} </view>
      <view>{{data[item.key] || '--'}}</view>
    </view>
  </view>
</template>
<script>
export default {
  props: {
	data: {
		type: Object,
	}
  },
  data() {
    return {
      list: [
        {
          key: 'changeShiftInfoCode',
          label: '编号：',
        },
        {
          key: 'deptName',
          label: '所属部门：',
        },
        {
          key: 'handoverTime',
          label: '交班时间：',
        },
        {
          key: 'shiftRuleDetailDescription',
          label: '接班班次：',
        },
        {
          key: 'handoverDeptName',
          label: '交班班组：',
        },
        {
          key: 'handoverUserName',
          label: '交班班长：',
        },
        {
          key: 'handoverSyntheticalUserName',
          label: '交班综合主办：',
        },
        {
          key: 'handoverEquipmentUserName',
          label: '交班设备主办：',
        },
        {
          key: 'handoverSafetyAndEnvironmentUserName',
          label: '交班安全主办：',
        },
        {
          key: 'handoverBuildUserName',
          label: '交班生产主办：',
        },
        {
          key: 'handoverOtherUserName',
          label: '交班其他人员：',
        },
        {
          key: 'takeoverDeptName',
          label: '接班班组：',
        },
        {
          key: 'takeoverUserName',
          label: '接班班长：',
        },

      ]
    }
  }
}
</script>
<style lang="scss" scoped>
.collapse-content {
  background: #fff;
  padding-left: 30rpx;
  width: 100%;
  box-sizing: border-box;

  &>view {
    padding: 24rpx 0;
    width: 100%;
    display: flex;
    align-items: flex-start;
    font-size: 28rpx;
    font-family: PingFang SC-Regular, PingFang SC;
    font-weight: 400;
    color: #333333;
    border-bottom: 1rpx solid #d5d7e3;

    & view:first-child {
      // width: 190rpx;
      margin-right: 4rpx;
      // text-align: right;
    }

    & view:last-child {
      flex: 1;
      word-break: break-all;
      color: #666666;
      padding-right: 30rpx;
      box-sizing: border-box;
    }
  }

  &>view:last-child {
    border: 0;
  }
}
</style>